home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Just Call Me Internet
/
Just Call Me Internet.iso
/
prog
/
atari
/
c
/
t100
/
codes
< prev
next >
Wrap
Text File
|
1991-09-20
|
5KB
|
142 lines
ANSI/vt100 Codes And Their Implementation In t100
-------------------------------------------------
Here is a list of all the ANSI/vt100 codes I know about and whether they
are supported or not in t100. Note that of the unsupported codes, the
ones used in a normal Unix termcap entry for standard vt100 ("Used"
column), the codes to reset some attributes are the default states for
t100 anyway so they are just silently ignored. The only code used in
termcap which we do not support is the scroll region and blinking chars.
As far as I know there is no way to "blink" chars on the ST without all
sorts for (probably non-portable) machinations. No big deal. Setting
the scroll region requires that t100 keep track of the current cursor
position on the screen. This can be done by either curses or by tracking
each incomming char and figure out how it effects cursor movement. While
not all that difficult, I just don't have time for it now.
In the table, v1 and v2 are 0, 1 or 2 char decimal numbers (ascii). For
example, to move to row 5, column 10, send "\E[5;10H". To home the cursor
send either "\E[1;1H" or "\E[H". \E is escape char (octal 33). A missing
number generally means 0 or 1. The home position (upper left corner) is
row 1 col 1. These values are used as repeat counts. So to move the cursor
up 2, either send "\E[A\E[A" or "\E[2A".
So far, t100 supports application or normal cursor chars. These are the
arrow keys. In application mode, t100 sends \EOA, \EOB, \EOC, and \EOD
for up, down, right, and left, respectively. In normal mode, t100 sends
the normal cursor motions (\E[A, \E[B, \E[C, and \E[D, respectively).
t100 does support the keypad The codes should be (I'm not 100% sure of the
ones marked "???"):
key appl mode normal mode scan code (hex)
0 \EOp 0 00700030
1 \EOq 1 006d0031
2 \EOr 2 006e0032
3 \EOs 3 006f0033
4 \EOt 4 006a0034
5 \EOu 5 006b0035
6 \EOv 6 006c0036
7 \EOw 7 00670037
8 \EOx 8 00680038
9 \EOy 9 00690039
- \EOm - 004a002d
enter \EOM return 0072000d
. \EOn . 0071002e
+ ??? + 004e002b
( \EOP ??? ( 00630028
) \EOQ ??? ) 00640029
/ \EOR ??? / 0065002f
* \EOS ??? * 0066002a
The code sent in application mode is an escape sequence. Otherwise the
key's face value is sent.
Unsupported Codes:
Code Used Description
-------------------------------------------------------
\EZ send terminal id
\EH set tab
\E> * reset keypad (normal)
\E= * set keypad (application)
\E[?2l change to vt52
\E[?3l * reset column width (80)
\E[?3h set column width (132)
\E[?4l * reset smooth scroll
\E[?4h set smooth scroll
\E[?6l reset origin mode
\E[?6h set origin mode
\E[?1i print line
\E[v1;v2r * set scroll region
\E[v1P delete char
\E[c send device attributes
\E[g clear tabs
\E[7i enable ext port
\E[6i disable ext port
\E[0i print screen
\E[4i reset transparent print mode
\E[5i set transparent print mode
\E[4h set insert mode
\E[2h set keyboard action mode
\E[20h set newline mode
\E[4l reset insert mode
\E[2l reset keyboard action mode
\E[20l reset newline mode
\E[5m * blinking
\E[n status report request
\E[x request terminal parameters
\E[@ insert char
Supported Codes:
Code Used Description
---------------------------------------------------------
\Ec reset
\ED index
\EM * scroll reverse
\EE next line
\E8 restore cursor to saved position
\E7 save cursor location
\E[?1l * reset cursor key
\E[?1h * set cursor key
\E[?4l * reset smooth scroll
\E[?5l * reset screen (normal video)
\E[?5h set screen (reverse video)
\E[?7l reset wrap
\E[?7h * set wrap
\E[?8l reset auto repeat
\E[?8h * set auto repeat
\E[v1;v2H * absolute cursor position
\E[v1;v2f absolute cursor position
\E[2;1y self test and reset
\E[v1A * cursor up
\E[v1B cursor down
\E[v1C * cursor right
\E[v1D cursor left
\E[H * home (special case of \E[v1;v2H)
\E[f home
\E[J erase from cursor to end of screen
\E[0J erase from cursor to end of screen
\E[1J erase from start of screen to cursor
\E[2J * erase screen
\E[K * erase from cursor to end of line
\E[0K erase from cursor to end of line
\E[1K erase from start of line to cursor
\E[2K erase line
\E[v1L insert line
\E[v1M delete line
\E[0m clear graphics mode
\E[m * clear graphics mode
\E[1m * bold
\E[4m * underline
\E[7m * reverse video (char)